<!DOCTYPE html>
<html lang="en">
  <head>
    <title>ViewController Class Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset='utf-8'>
    <script src="../js/jquery.min.js" defer></script>
    <script src="../js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a name="//apple_ref/swift/Class/ViewController" class="dashAnchor"></a>
    <a title="ViewController Class Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="../index.html">Spruce Docs</a> (100% documented)</p>
        <p class="header-right"><a href="https://github.com/willowtreeapps/spruce-ios"><img src="../img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="../index.html">Spruce Reference</a>
        <img id="carat" src="../img/carat.png" />
        ViewController Class Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="../Classes.html">Classes</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Classes/Button.html">Button</a>
              </li>
              <li class="nav-group-task">
                <a href="../Classes/ViewController.html">ViewController</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Enums.html">Enums</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Enums/Angle.html">Angle</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Corner.html">Corner</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Direction.html">Direction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Distance.html">Distance</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Position.html">Position</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Scale.html">Scale</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/SlideDirection.html">SlideDirection</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/StockAnimation.html">StockAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Enums/Weight.html">Weight</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Extensions.html">Extensions</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Extensions/CGPoint.html">CGPoint</a>
              </li>
              <li class="nav-group-task">
                <a href="../Extensions/UIView.html">UIView</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Protocols.html">Protocols</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Protocols/Animation.html">Animation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/CornerSortFunction.html">CornerSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DirectionSortFunction.html">DirectionSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/DistanceSortFunction.html">DistanceSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/PositionSortFunction.html">PositionSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/SortFunction.html">SortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/View.html">View</a>
              </li>
              <li class="nav-group-task">
                <a href="../Protocols/WeightSortFunction.html">WeightSortFunction</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="../Structs.html">Structs</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="../Structs/ContinuousSortFunction.html">ContinuousSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/ContinuousWeightedSortFunction.html">ContinuousWeightedSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/CorneredSortFunction.html">CorneredSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/DefaultSortFunction.html">DefaultSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/InlineSortFunction.html">InlineSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/LinearSortFunction.html">LinearSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/RadialSortFunction.html">RadialSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/RandomSortFunction.html">RandomSortFunction</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SpringAnimation.html">SpringAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/Spruce.html">Spruce</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SprucePoint.html">SprucePoint</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/SpruceUIView.html">SpruceUIView</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs/StandardAnimation.html">StandardAnimation</a>
              </li>
              <li class="nav-group-task">
                <a href="../Structs.html#/s:V6Spruce9TimedView">TimedView</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>ViewController</h1>
            <p>Undocumented</p>

          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC6Spruce14ViewController10animationsGSaOS_14StockAnimation_"></a>
                    <a name="//apple_ref/swift/Property/animations" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC6Spruce14ViewController10animationsGSaOS_14StockAnimation_">animations</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>an array of spruce stock animations that will be used to animate all of the subviews of the <code><a href="../Classes/ViewController.html#/s:vC6Spruce14ViewController13animationViewGSqCSo6UIView_">animationView</a></code></p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="n">open</span> <span class="k">var</span> <span class="nv">animations</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Enums/StockAnimation.html">StockAnimation</a></span><span class="p">]</span> <span class="o">=</span> <span class="p">[]</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC6Spruce14ViewController8durationSd"></a>
                    <a name="//apple_ref/swift/Property/duration" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC6Spruce14ViewController8durationSd">duration</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>the length of each of the individual subview animations</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="n">open</span> <span class="k">var</span> <span class="nv">duration</span><span class="p">:</span> <span class="kt">TimeInterval</span> <span class="o">=</span> <span class="mf">0.3</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC6Spruce14ViewController13animationTypePS_9Animation_"></a>
                    <a name="//apple_ref/swift/Property/animationType" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC6Spruce14ViewController13animationTypePS_9Animation_">animationType</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>the style of animation that will be apllied to each of the subviews</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="n">open</span> <span class="k">var</span> <span class="nv">animationType</span><span class="p">:</span> <span class="kt"><a href="../Protocols/Animation.html">Animation</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC6Spruce14ViewController12sortFunctionPS_12SortFunction_"></a>
                    <a name="//apple_ref/swift/Property/sortFunction" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC6Spruce14ViewController12sortFunctionPS_12SortFunction_">sortFunction</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>the sort function that should be used for choreographing the animations</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="n">open</span> <span class="k">var</span> <span class="nv">sortFunction</span><span class="p">:</span> <span class="kt"><a href="../Protocols/SortFunction.html">SortFunction</a></span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:vC6Spruce14ViewController13animationViewGSqCSo6UIView_"></a>
                    <a name="//apple_ref/swift/Property/animationView" class="dashAnchor"></a>
                    <a class="token" href="#/s:vC6Spruce14ViewController13animationViewGSqCSo6UIView_">animationView</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>the view that Spruce should be called on. This means that the subviews of this view will animate in.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="n">open</span> <span class="k">var</span> <span class="nv">animationView</span><span class="p">:</span> <span class="kt">UIView</span><span class="p">?</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6Spruce14ViewControllercFT5coderCSo7NSCoder_GSqS0__"></a>
                    <a name="//apple_ref/swift/Method/init(coder:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6Spruce14ViewControllercFT5coderCSo7NSCoder_GSqS0__">init(coder:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Undocumented</p>

                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6Spruce14ViewController11viewDidLoadFT_T_"></a>
                    <a name="//apple_ref/swift/Method/viewDidLoad()" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6Spruce14ViewController11viewDidLoadFT_T_">viewDidLoad()</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>in the <code>viewDidLoad</code> method all of the views are prepared for animation</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="k">override</span> <span class="n">open</span> <span class="kd">func</span> <span class="nf">viewDidLoad</span><span class="p">()</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:FC6Spruce14ViewController13viewDidAppearFSbT_"></a>
                    <a name="//apple_ref/swift/Method/viewDidAppear(_:)" class="dashAnchor"></a>
                    <a class="token" href="#/s:FC6Spruce14ViewController13viewDidAppearFSbT_">viewDidAppear(_:)</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>a simple overrided method that will call <code>spruce_up</code> on the <code><a href="../Classes/ViewController.html#/s:vC6Spruce14ViewController13animationViewGSqCSo6UIView_">animationView</a></code>. If the <code><a href="../Classes/ViewController.html#/s:vC6Spruce14ViewController13animationViewGSqCSo6UIView_">animationView</a></code> is not set then nothing will happen. The code should silently fail.</p>

                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="k">override</span> <span class="n">open</span> <span class="kd">func</span> <span class="nf">viewDidAppear</span><span class="p">(</span><span class="n">_</span> <span class="nv">animated</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span></code></pre>

                        </div>
                      </div>
                      <div>
                        <h4>Parameters</h4>
                        <table class="graybox">
                          <tbody>
                            <tr>
                              <td>
                                <code>
                                <em>animated</em>
                                </code>
                              </td>
                              <td>
                                <div>
                                  <p>If true, the view was added to the window using an animation.</p>

                                </div>
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2017 <a class="link" href="https://willowtreeapps.com" target="_blank" rel="external">WillowTree</a>. All rights reserved. (Last updated: 2017-03-10)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.7.4</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
